package com.mobile.mainMenu.business;

import java.util.List;

import com.mobile.business.BaseBusiness;
import com.mobile.mainMenu.model.SysMenuSon;
import com.mobile.mainMenu.model.SysRolePopedom;
/**
 * 处理菜单的业务逻辑类
 * @author hf
 *
 */
public class MenuBusinessOld extends BaseBusiness {
	public List<SysRolePopedom> findMenuByRoleCode(String roleCode,String operateType){
		SysRolePopedom example=new SysRolePopedom();
		example.setRoleCode(roleCode);
		example.setOperateType(operateType);
		List<SysRolePopedom> list=baseDAO.findByExample(example);
		return list;
	}
	
	public List<SysRolePopedom> findTopMenuByRoleCode(String roleCode){
		SysRolePopedom example=new SysRolePopedom();
		example.setRoleCode(roleCode);
		example.setOperateType("1");
		List<SysRolePopedom> list=baseDAO.findByExample(example);
		return list;
	} 
	
	public List<SysMenuSon> findSecondMenuByRoleCode(String fatherMenu){
		SysMenuSon example=new SysMenuSon();
		example.setFatherMenu(fatherMenu);
		example.setMenuLevel("1");
		List<SysMenuSon> list=baseDAO.findByExample(example,new String[]{"arrangeId"});
		return list;
	} 
	
	public List<SysMenuSon> findSecondMenuByRoleCode(String fatherMenu,String superMenu){
		SysMenuSon example=new SysMenuSon();
		example.setFatherMenu(fatherMenu);
		example.setSuperMenu(superMenu);
		example.setMenuLevel("2");
		List<SysMenuSon> list=baseDAO.findByExample(example,new String[]{"arrangeId"});
		return list;
	} 
}
